package com.t.animal;

public class Test {
    public static void main(String[] args) {
        Animal d = new Dog();
        d.name="狗";
        d.eat();
        d.sleep();
        Animal c = new Cat();
        c.name="猫";
        c.eat();
        c.sleep();
        Animal s = new Snail();
        s.name="蜗牛";
        s.eat();
        s.sleep();
    }
}
